<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     template="../../Template.xhtml"
>
<ui:define name="title">Manage Professional Carrier Expiry </ui:define>
<ui:define name="body">


<br/><br/>

<p:panelGrid columns="1">

<h2>Manage Professional Carrier Expiry </h2>
<h:form>
<p:panelGrid columns="4">
<p:outputLabel value="Country" /> 

<p:outputLabel value="Month" />

<p:outputLabel value="Year" />

<p:commandButton  ajax="false" value="Filter"  >
	<p:ajax  update="expiration" event="click"  />
</p:commandButton>

<p:selectOneMenu value="#{expiryMB.idPays}" >
<f:selectItem itemLabel="Select Industry" itemValue="" noSelectionOption="true" />
	<f:selectItems   value="#{expiryMB.listPays()}" var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}" />
</p:selectOneMenu>
<p:selectOneMenu value="#{expiryMB.mounth}" >
<f:selectItem itemLabel="Select mounth" itemValue="" noSelectionOption="true" />
		<f:selectItem itemValue="1" itemLabel="January" />
		<f:selectItem itemValue="2" itemLabel="February" />
		<f:selectItem itemValue="3" itemLabel="March" />
		<f:selectItem itemValue="4" itemLabel="April" />
		<f:selectItem itemValue="5" itemLabel="Mai" />
		<f:selectItem itemValue="6" itemLabel="June" />
		<f:selectItem itemValue="7" itemLabel="July" />
		<f:selectItem itemValue="8" itemLabel="August" />
		<f:selectItem itemValue="9" itemLabel="Septembre" />
		<f:selectItem itemValue="10" itemLabel="October" />
		<f:selectItem itemValue="11" itemLabel="November" />
		<f:selectItem itemValue="12" itemLabel="December" />
</p:selectOneMenu>

<p:selectOneMenu value="#{expiryMB.year}">
<f:selectItem itemLabel="Select year" itemValue="" noSelectionOption="true" />
		<c:forEach var="i" items="#{expiryMB.listeINT}">
			<f:selectItem  itemLabel="#{i}" itemValue="#{i}"/>
		</c:forEach>
</p:selectOneMenu>
 </p:panelGrid>
 <br/> <br/> <br/>
  <p:dataTable id="expiration" var="car" value="#{expiryMB.listeExpiry('Exp','Pri')}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
        <p:column headerText="Id">
            <h:outputText value="#{car.c.idUtilisateur}" />
        </p:column>
        <p:column headerText="Username">
            <h:outputText value="#{car.c.username}" />
        </p:column>
        
        <p:column headerText="Email :">
             <h:outputText value="#{car.c.email}" />
       </p:column>
       
       <p:column headerText="CID Number:">
             <h:outputText value="#{car.c.CID}" />
       </p:column>
       
        <p:column headerText="Move Cargo Payment Expiry">
             <h:outputText value="#{car.d}" />
       </p:column>
       
        <p:column headerText="Statut">
        <c:if test="#{car.c.statut}">
              <h:outputText value="Active" />
       </c:if>
        <c:if test="#{!car.c.statut}">
              <h:outputText value="Inactive" />
       </c:if>
       
        </p:column>
        <p:column style="width:32px;text-align: center">
             <p:commandButton  icon="ui-icon-search" title="View" action="gh" />
             <p:commandButton ajax="false" action="ff" icon="ui-icon ui-icon-pencil">
            </p:commandButton>
            <p:commandButton ajax="false" action="ff" icon="ui-icon ui-icon-close">
            </p:commandButton>
         </p:column>
    </p:dataTable>
</h:form>
  </p:panelGrid>
</ui:define>
</ui:composition>